-
-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
spiral-matrix: add to track #677
Conversation
@@ -285,6 +285,13 @@ | |||
] | |||
}, | |||
{ | |||
"slug": "spiral-matrix", | |||
"difficulty": 6, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best guess.
|
||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check: is this needed per policy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, according to the policy after the first 20 exercises no starter implementation needs to be provided. But quite a few exercises after the first 20 have an empty starter implementation like this. Do you think that's okay or should we make them more consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's an open issue for cleanup; let's decide there whether we want no implementation or empty class(es)! #554
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I have a few comments, but they're all really minor so happy to merge as is :)
class SpiralMatrixBuilder { | ||
|
||
int[][] ofSize(int size) { | ||
if (size == 0) return new int[][]{}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add curly brackets and put the if
body on a new line, just to be safe :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kotlin habits sneaking in ;)
|
||
|
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, according to the policy after the first 20 exercises no starter implementation needs to be provided. But quite a few exercises after the first 20 have an empty starter implementation like this. Do you think that's okay or should we make them more consistent?
@@ -0,0 +1,27 @@ | |||
class SpiralMatrixBuilder { | |||
|
|||
int[][] ofSize(int size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe buildMatrixOfSize()
would be a more descriptive name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks @stkent! :)
problem specification directory
Reviewer Resources:
Track Policies